package calculator

type Calculator interface {
	DoCalculator() float64
}

type Operator struct {
	Num1   float64
	Num2   float64
	Result float64
}

// 加法
type AddOperator struct {
	Operator
}

func (o *AddOperator) DoCalculator() float64 {
	return o.Num1 + o.Num2
}

// 减法
type SubOperator struct {
	Operator
}

func (o *SubOperator) DoCalculator() float64 {
	return o.Num1 - o.Num2
}
